package com.zhongdu.stady.token;

import com.zhongdu.stady.shiro.ELoginType;
import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 手机验证码登录凭证
 * @ClassNamePhoneToken
 * @Description
 * @Author ange
 * @Date2019/10/17 16:25
 * @Version V1.0
 **/

public class PhoneToken extends UsernamePasswordToken {
    private static final long serialVersionUID = -2371790202612247314L;

    //登录方式
    private ELoginType loginType;
    //微信code
    private String code;

    // TODO 由于是demo方法，此处手机只传一个验证码参数，其他参数根据实际情况添加
    public PhoneToken(ELoginType loginType, final String username, final String password) {
        super(username, password);
        this.loginType = loginType;
    }

    public PhoneToken(ELoginType loginType, String username, String password, String code) {
        super(username, password);
        this.loginType = loginType;
        this.code = code;
    }

    public ELoginType getLoginType() {
        return loginType;
    }

    public void setLoginType(ELoginType loginType) {
        this.loginType = loginType;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}